Hello!
I have a window that is created on an object Trigger. The problem is,
-> when i open the window with the show(window)-method, the created window jumps to the background
-> when i open the window with block(window)-method, the Database Explorer Window jumps to the front after exiting the modal method (the modul is in background).
Has someone experiences with such focus problems?
string DXLCode = "
Trigger trg = current;
if (null trg) halt();
AttrDef ad = attrdef(trg);
if (null ad) halt(); // Error?
Object obj = object(trg);
if (null obj) halt(); // Error?
string Name = ad.name;
print Name;
if (Name != \"BB_Trigger_Test\") halt()
// Switches off DXL run-time errors until lastError is called
//infoBox \"Drin!\"
noError()
//obj.\"BB_Trigger_Test\" = \"Test2\"
void changeWorkflowStep(DBE x)
{
string selectedWFStep = get x;
infoBox selectedWFStep;
}
string workflowStepsArray[] = {};
DB selectionWindow = create(\"Select next Workflow Step\");
DBE dropDownBoxSelectWorkflowStep=choice(selectionWindow,\"Select Workflow Step:\", workflowStepsArray,0,0,40, false);
set(dropDownBoxSelectWorkflowStep,changeWorkflowStep);
realize(selectionWindow);
show (selectionWindow);
lastError()
bringToFront(selectionWindow);
" // End definition of string DXLCode
Trigger trg;
bool TrigOK = true;
string ErrMess = checkDXL(DXLCode);
if (!null ErrMess)
{
print ErrMess "\n***********\n" DXLCode "**********\n"
TrigOK = false
}
string NameTrig = "TriggerResetValidatedOn"
string Prompt = "Delete trigger '" NameTrig "' ??"
if (!TrigOK) Prompt = "Trigger code has errors.\n" Prompt
if (confirm(Prompt))
{
ErrMess = delete (NameTrig, module->object, post, open, 6);
}
if (TrigOK && confirm("Deploy trigger '" NameTrig "' ??"))
{
trg = trigger(NameTrig, module->object, post, open, 6, DXLCode)
}
Bjoern_Karpenstein - Thu Jul 23 07:59:51 EDT 2015 |
Re: DB Window created in Trigger jumps to background Well - depending on the parenting of the dialog boxes (module or DB explorer or other DB) windows can start jumping in DOORS. You can usually come by these problems by simply raising them to top again using the raise(DB) perm. Regards, Mathias |
Re: DB Window created in Trigger jumps to background Mathias Mamsch - Thu Jul 23 16:34:13 EDT 2015 Well - depending on the parenting of the dialog boxes (module or DB explorer or other DB) windows can start jumping in DOORS. You can usually come by these problems by simply raising them to top again using the raise(DB) perm. Regards, Mathias Hello Mathias,
thank you very much for your reply.... I have tried to use the raise method in the trigger, but unfortunately they window jumps to the background although.
I want to simulate an object state workflow, so that a selection box only shows target value-states, dependend on the current selection (i.e. state draft has the target states "proposal" or "trash") and state "proposal" has the possible target states "draft" or "released").
So my approach was to generate a modal dialog on mouse position (how can i tell "on mouse position?") , but the focusses are messing up :/. |
Re: DB Window created in Trigger jumps to background Bjoern_Karpenstein - Fri Jul 24 04:40:11 EDT 2015 Hello Mathias,
thank you very much for your reply.... I have tried to use the raise method in the trigger, but unfortunately they window jumps to the background although.
I want to simulate an object state workflow, so that a selection box only shows target value-states, dependend on the current selection (i.e. state draft has the target states "proposal" or "trash") and state "proposal" has the possible target states "draft" or "released").
So my approach was to generate a modal dialog on mouse position (how can i tell "on mouse position?") , but the focusses are messing up :/. Maybe instead of a normal dialog box you should use a topMost dialog box, which will stay in front of everything? You cannot tell the mouse position, therefore I would recommend you create a centered dialog box. Regards, Mathias |
Re: DB Window created in Trigger jumps to background Bjoern_Karpenstein - Fri Jul 24 04:40:11 EDT 2015 Hello Mathias,
thank you very much for your reply.... I have tried to use the raise method in the trigger, but unfortunately they window jumps to the background although.
I want to simulate an object state workflow, so that a selection box only shows target value-states, dependend on the current selection (i.e. state draft has the target states "proposal" or "trash") and state "proposal" has the possible target states "draft" or "released").
So my approach was to generate a modal dialog on mouse position (how can i tell "on mouse position?") , but the focusses are messing up :/. Hi Instead of dxl-dialogs you can use other ones. First dialog may created by a jar-file and is written in java and the other possiblity may be Auto_IT (https://autoit.de/) You only have to implement a basic dialgo structure. Best regards Wolfgang
|